<%@ page language="java" import="java.util.*, java.io.*" pageEncoding="ISO-8859-1"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<jsp:useBean id="defectbean" type="dtt.DefectBean" scope="request" />
<jsp:useBean id="projectbean" type="dtt.ProjectBean" scope="request" />

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>My JSP 'Content_template.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		
	<link rel="stylesheet" type="text/css" href="styles.css">
	
   <script language="javascript">
   
	function cancelForm(){
	  window.displaydefectform.DTT_ACTION.value="DEFECT_LIST";
	}
   </script>
	</head>

	<body>
	 <br>
		<form name ="displaydefectform" action="servlet/FrontController" method="post">
		<input type="hidden" name="DTT_ACTION" value="VIEW_UPDATABLE_FORM"/> 
		<table valign="top" border="0" align="center" width="85%">
			<tr>
				<td>
					<b>Project Number</b>
				</td>
				<td valign="top"><br></td><td>
					<b>Project Description</b>
				</td>
				<td>
					<b>Project Category </b>
				</td>
			</tr>
			<tr>
				<td>
					<input readonly type="text" name="projectId1" value="<%=defectbean.getProjectId()%>" >
					<input type="hidden" name="projectId" value="<%=defectbean.getProjectId()%>" >
				</td>
				<td valign="top"><br></td><td>
					<input readonly type="text" name="projectDesc" value="ProjectDesc" value="<%=defectbean.getProjectId()%>" >
				</td>
				<td>
					<input readonly type="text" name="projectCategory" value="<%=projectbean.getProjectCategory()%>" >
				</td>
			</tr>

			<tr>
				<td><br></td>
				<td valign="top"><br></td><td><br></td>
				<td><br></td>
			</tr>

			<tr>
				<td>
					<b>Requirement ID
				</td>
				<td valign="top"><br></td><td>
					<b>Script ID
				</td>
				<td>
					<b>Defect ID
				</td>
			</tr>
			<tr>
				<td>
					<input readonly type="text" name="requirementId" value="<%=defectbean.getRequirementId()%>" >
				</td>
				<td valign="top"><br></td><td>
				   <input readonly type="text" name="testScriptId" value="<%=defectbean.getTestScriptId()%>" >
				</td>
				<td>
				    <input readonly type="text" name="defectId1" value="<%=defectbean.getDefectId()%>">
				    <input type="hidden" name="defectId" value="<%=defectbean.getDefectId()%>">
				</td>
			</tr>

			<tr>
				<td><br></td>
				<td valign="top"><br></td><td><br></td>
				<td><br></td>
			</tr>

			<tr>
				<td>
					<b>Date Submitted
				</td>
				<td valign="top"><br></td><td>
					<b>Severity
				</td>
				<td>
					<b>Priority
				</td>
			</tr>
			<tr>
				<td>
				    <input readonly type="text" name="DateSubmitted1" >
					</td>
				<td valign="top"><br></td><td>
				    <input readonly type="text" name="defectSeverity" value="<%=defectbean.getDefectSeverity()%>">
				</td>
				<td>
				    <input readonly type="text" name="defectPriority" value="<%=defectbean.getDefectPriority()%>">  
				</td>
			</tr>

			<tr>
				<td><br></td>
				<td valign="top"><br></td><td><br></td>
				<td><br></td>
			</tr>

			<tr>
				<td>
					<b>Last Updated
				</td>
				<td valign="top"><br></td><td>
					<b>Reported By
				</td>
				<td>
					<b>Assigned To
				</td>
			</tr>
			<tr>
				<td>
					<input readonly type="text" name="LastUpdated" value="<%=defectbean.getDefectLastUpdatedBy()%>">
				</td>
				<td valign="top"><br></td><td>
					<input readonly type="text" name="ReportedBy" value="<%=defectbean.getDefectReportedBy()%>">
				</td>
				<td>
					<input readonly type="text" name="AssignedTo" value="<%=defectbean.getDefectAssignedto()%>">
				</td>
			</tr>

			<tr>
				<td><br></td>
				<td valign="top"><br></td><td><br></td>
				<td><br></td>
			</tr>

			<tr>
				<td>
					<b>Can Be Reproduced
				</td>
				<td valign="top"><br></td><td>
					<b>Status
				</td>
				<td>
					<b>Product Version Number
				</td>
			</tr>
			<tr>
				<td>
				    <input readonly type="text" name="DefectReproducibility" value="<%=defectbean.getDefectReproducibility()%>"> 
				</td>
				<td valign="top"><br></td><td>
				    <input readonly type="text" name="defectStatus" value="<%= defectbean.getDefectStatus()%>" >
				<td>
				    <input readonly type="text" name="defectProductVerNbr" value="<%= defectbean.getDefectProductVerNbr()%>">
				</td>
			</tr>

			<tr>
				<td><br></td>
				<td valign="top"><br></td><td><br></td>
				<td><br></td>
			</tr>

			<tr>
				<td>
					<b>Build Number
				</td>
				<td valign="top"><br></td><td>
					<b>Target Version Number
				</td>
				<td>
					<b>Fixed In Version Number
				</td>
			</tr>
			<tr>
				<td>
					<input readonly type="text" name="defectBuildNbr" value="<%= defectbean.getDefectBuildNbr()%>">
				</td>
				<td valign="top"><br></td><td>
				    <input readonly type="text" name="defectTgtVerNbr" value="<%= defectbean.getDefectTgtVerNbr()%>">
				</td>
				<td>
					<input readonly type="text" name="defectFixedinVerNbr" value="<%= defectbean.getDefectFixedinVerNbr()%>">
				</td>
			</tr>


		</table>
		<table valign="top" border="0" align="center" width="85%">
			<tr>
				<td>
					<b>Description 
				</td>
			</tr>
			<tr>
				<td>
					<textarea readonly rows="1" cols="80" name="defectDesc"><%=defectbean.getDefectDesc()%></textarea>
				</td>
			</tr>
		</table>

		<table valign="top" border="0" align="center" width="85%"
			cellspacing="2" cellpadding="2">
			<tr>
				<td>
					<b>Steps To Reproduce the Defect
				</td>
				<td>
					<b> Development Repair Comments 
				</td>
				<td> Attachements</td>
				
			</tr>
			<tr>
				<td>
				<textarea readonly rows="15" cols="40" name="defectStepstoReproduce"><%=defectbean.getDefectStepstoReproduce()%></textarea>
					</td>
				<td>
				<textarea readonly rows="15" cols="40" name="defectDevFixCom"><%=defectbean.getDefectDevFixCom()%></textarea>
				</td>
				<td>
				  
<% 
				File   dir1=new   File("c:\\uploads\\");  
  String   filelist1[]=dir1.list();  
  for(int   i=0;i<filelist1.length;i++)  
  {  
  File   tmpfile=new   File(dir1,filelist1[i]);  
  if(!tmpfile.isFile());
  }  
  for(int   i=0;i<filelist1.length;i++)  
  {  
  File   tmpfile=new   File(dir1,filelist1[i]);  
  if(tmpfile.isFile())
  %>
  <%=i %><a href="/DTT/superuser1.jsp?filename=<%=tmpfile.getName() %>" /><%=tmpfile.getName() %></a> <br/>
<%
;
  }   
%>
			
				</td>
			</tr>
		</table>

		<br>
		<center>
			<table cellspacing="2" cellpadding="2">
				<tr>
					<td>
						<input type="submit" name="submit" value="Update">
					</td>
					<td width="20%">
					</td>
					<td>
						<input type="Submit" name="cancel" value="Cancel" onclick="cancelForm()">
					</td>


				</tr>

			</table>
			</center>
			</form>
	</body>
</html>

